{include file="common/header.tpl"}
<section class="main">
	<nav class="left-col">{include file="common/navi-education.tpl"}</nav>
    <article class="right-col">
		<h2><a href="{$smarty.const.HOST_BACKEND}ecourse/index">Khóa học</a> &raquo; Thêm mới</h2>
        <form name="frmAdd" id="frmAdd" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}ecourse/save" class="ui">
        	<input type="hidden" name="pcontent" id="pcontent" value="" />
            <input type="hidden" name="ptbfeature" id="ptbfeature" value="" />
        	<ul>
                {if isset($smarty.session.ECOURSE_ERROR)}
                    <li class="error">
                       {include file="common/error.tpl" dataSession=$smarty.session.ECOURSE_ERROR}    
                    </li>
                {/if}                
                <li>
                    <label for="pcategoryid">Hệ đào tạo <span class="required">*</span>:</label>
                    <div class="sel">
                        <select id="pcategoryid" name="pcategoryid" onchange="javascript:loadEdu('pcategoryid','pprovince','peducateid');">
                            <option value="0">---Chọn--</option>
                            {foreach item=item from=$arrCategory}
                            	<option value="{$item.categoryid}" {if isset($smarty.session.ECOURSE_POST.pcategoryid) && $smarty.session.ECOURSE_POST.pcategoryid == $item.categoryid}selected="selected"{/if}>{$item.name}</option>
                            {/foreach}
                        </select>
                    </div>
                </li>
                <li>
                    <label for="pprovince">Tỉnh/thành <span class="required">*</span>:</label>
                    <div class="sel">
                        <select id="pprovince" name="pprovince" onchange="javascript:loadEdu('pcategoryid','pprovince','peducateid');">
                            <option value="0">---Chọn--</option>
                            {html_options options=$arrProvince selected=$smarty.session.ECOURSE_POST.pprovince}
                        </select>
                    </div>
                </li>
                <li>
                    <label for="peducateid">Trường <span class="required">*</span>:</label>
                    <div class="sel">
                        <select id="peducateid" name="peducateid">
                            <option value="0">---Chọn--</option>
                            {html_options options=$arrEducate selected=$smarty.session.ECOURSE_POST.educateid}
                        </select>
                    </div>
                </li>
                <li>
                    <label for="pname">Tên khóa học <span class="required">*</span>:</label>
                    <div class="txt">
                    	<input type="text" class="text" id="pname" name="pname" value="{if isset($smarty.session.ECOURSE_POST.pname)}{$smarty.session.ECOURSE_POST.pname|escape}{/if}" maxlength="{$smarty.const.VL_NAME_MAXLENGTH}"/>
                    </div>
                </li>                
                <li>
                    <label for="pstart">Bắt đầu:</label>
                    <div class="txt">
                    	<input type="text" class="text" id="pstart" name="pstart" value="{if isset($smarty.session.ECOURSE_POST.start)}{$smarty.session.ECOURSE_POST.start|escape}{/if}" maxlength="10"/>
                    </div>
                </li>
                <li>
                    <label for="pprice">Học phí:</label>
                    <div class="txt">
                        <input type="text" class="text" id="pprice" name="pprice" value="{if isset($smarty.session.ECOURSE_POST.pprice)}{$smarty.session.ECOURSE_POST.pprice|escape}{/if}" maxlength="50"/>
                        <p style="float:left;clear:both;padding-top:5px;color:#999999">Nếu học phí nằm trong khoảng thì cách nhau bằng dấu "-". Vd: 600-800</p>
                    </div>
                </li>
                <li>
                    <label for="punit">Đơn vị học phí:</label>
                    <div class="sel">
                        <select id="punit" name="punit">                                	
                            {html_options options=$arrUnit selected=$smarty.session.ECOURSE_POST.punit}
                        </select>
                    </div>
                </li> 
                
                <li>
                    <label for="pshort">Tóm lược:</label>
                    <div class="area">
                    	<textarea rows="1" cols="1" id="pshort" name="pshort">{if isset($smarty.session.ECOURSE_POST.pshort)}{$smarty.session.ECOURSE_POST.pshort|escape}{/if}</textarea>
                    </div>
                </li>                     
                <li>
                    <label for="pcontent">Nội dung khóa học <span class="required">*</span>:</label>
                    <div class="area">
                    	<textarea rows="1" cols="1" name="fckcontent" id="fckcontent">{$smarty.session.ECOURSE_POST.pcontent}</textarea>
                    </div>
                </li> 
                <li>
                    <label for="ptag">Tag:</label>
                    <div class="txt">
                    	<input type="text" class="text" id="ptag" name="ptag" value="{if isset($smarty.session.ECOURSE_POST.ptag)}{$smarty.session.ECOURSE_POST.ptag|escape}{/if}" maxlength="100"/>
                    </div>
                </li>                 
                <li>
                	<label>Thông tin mở rộng:</label>
                    {include file="common/table-feature.tpl"}
                </li>                          
                <li>
                	<button type="submit">Lưu dữ liệu</button>
                    <button type="reset">Nhập lại</button>
                </li>
            </ul>
        </form>
    
    </article>
</section>                     	
{include file="common/footer.tpl"}
                
